package action;

import modele.Client;

import com.opensymphony.xwork2.ActionSupport;

import data.ClientXML;

public class SupprimeClient extends ActionSupport {
	
	private static final long serialVersionUID = 3950635267464727091L;
	private int idClient;
	private String nom;
	private String prenom;
	private String adresse;
	private String email;
	
    public String execute() throws Exception {
    	return SUCCESS;
	}

    public String supprimer() {
    	ClientXML clientXML = new ClientXML();
    	Client client = new Client(idClient,nom,prenom,adresse,email);
    	System.out.println("je dois supprimer le client id : " + idClient + " nom : " + nom);
    	clientXML.supprimerClient(client);
    	return SUCCESS;
    }

	public int getIdClient() {
		return idClient;
	}

	public void setIdClient(int idClient) {
		this.idClient = idClient;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getAdresse() {
		return adresse;
	}

	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
}
